package com.yc.cloudvideo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author LYYT
 * @since 2022-08-03
 */
@TableName("store_file")
public class StoreFile implements Serializable {
    private LocalDateTime beginTime;

    public LocalDateTime getBeginTime() {

        return beginTime;
    }

    public void setBeginTime(LocalDateTime begin_time) {
        this.beginTime = begin_time;
    }

    //文件信息
    @TableField(exist = false)
    private File file;

    public StoreFile() {
    }

    public StoreFile(LocalDateTime beginTime, Long cid, Long fid, Long isSpread) {
        this.beginTime = beginTime;
        this.cid = cid;
        this.fid = fid;
        this.isSpread = isSpread;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long cid;

    private Long fid;

    /**
     * 是否是转发，是转发 保存被转发文件的上传人uid
     */
    private Long isSpread;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCid() {
        return cid;
    }

    public void setCid(Long cid) {
        this.cid = cid;
    }

    public Long getFid() {
        return fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }

    public Long getIsSpread() {
        return isSpread;
    }

    public void setIsSpread(Long isSpread) {
        this.isSpread = isSpread;
    }

    @Override
    public String toString() {
        return "StoreFile{" +
                "id=" + id +
                ", cid=" + cid +
                ", fid=" + fid +
                ", isSpread=" + isSpread +
                ", file=" + file +
                "}";
    }
}
